#include <iostream>
#define PI 3.1415
using namespace std;

class Point
{
    private:
        int x;
        int y;

    public:
        Point(int x_in,int y_in){x=x_in;y=y_in;}
        void setPoint(int x0,int y0){x=x0;y=y0;}
        int getX(){return x;}
        int getY(){return y;}
        void show(){cout<<"x="<<x<<endl<<"y="<<y<<endl;}
};

class Circle: public Point
{
    private:
        float radius;

    public:
        Circle(int x0, int y0, float r) : Point(x0, y0) { radius = r; }
        void setRadius(float r){radius=r;}
        float getRadius(){return radius;}
        void show()
        {
            Point::show(); 
            cout << "radius=" << radius << endl;
        }
        float getArea(){return PI*radius*radius;}
};

class Cylinder: public Circle
{
    private:
        float height;

    public:
        Cylinder(int x0, int y0, float r, float h) : Circle(x0, y0, r) { height = h; }
        void setHeight(float h){height = h;}
        float getHeight(){return height;}
        float getArea()
        {
            float area = Circle::getArea()*2+PI*Circle::getRadius()*Circle::getRadius();
            return area;
        }
                void show()
        {
            Circle::show();
            cout << "height:" << height << endl;
            cout<<"area:"<<getArea()<<endl;
        }
};

int main()
{
    Point P(1,4);
    P.show();
    Circle c(200,55,46);
    c.show();
    Cylinder Cy(100,9,32,78);
    Cy.show();

    cin.get();
    return 0;
}
